/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.pclong.fightlandlordserver;

import java.util.ArrayList;
import java.util.List;
import org.simpleframework.xml.Default;
import org.simpleframework.xml.Element;
import org.simpleframework.xml.ElementList;

/**
 *
 * @author long@7road.com       
 */
@Default
public class TankAgentConfigEntity {

    private static TankAgentConfigEntity instance;

    /**
     * Get the value of instance
     *
     * @return the value of instance
     */
    public static TankAgentConfigEntity getInstance() {
        if (instance == null) {
            instance = new TankAgentConfigEntity();
        }
        return instance;
    }

    public static void setInstance(TankAgentConfigEntity tankAgentConfigEntity) {

        TankAgentConfigEntity.instance = tankAgentConfigEntity;
        if (TankAgentConfigEntity.instance.Users.size() < 1) {
         TankAgentConfigEntity.instance.Users.add(new UserConfigEntity("long","bd3027fa569ea15ca76d84db21c67e2d514c1a5a"));   
        }
    }
//    @Element
//    public ServerConfigEntity server;
//    ///  Gets or sets the theme name.
    @Element(required = false)
    public String Theme;
    ///  Gets or sets a boolean value to enable or disable server selection.
    @Element(required = false)
    public boolean HomeEnabled;
    ///  Gets or sets a boolean value to enable or disable login.
    @Element(required = false)
    public boolean LoginEnabled;
    ///  Gets or sets a boolean value to enable or disable payment.
    @Element(required = false)
    public boolean PayEnabled;
    ///  Gets or sets a boolean value to enable or disable pay request.
    @Element(required = false)
    public boolean PayRequestEnabled;
    ///  Gets or sets a boolean value to enable or disable mix server.
    @Element(required = false)
    public boolean MixServerEnabled;
    ///  Gets or sets a boolean value to enable or disable sns transfer.
    @Element(required = false)
    public boolean SnsTransferEnabled;
    ///  Gets or sets the users.
    @ElementList(inline = true, required = false)
    public List<UserConfigEntity> Users;

    /// Gets or sets the users.
    //public SiteConfigEntity Site ;
    public TankAgentConfigEntity() {
        Theme = "Default";

        HomeEnabled = true;
        LoginEnabled = true;
        PayEnabled = true;
        PayRequestEnabled = true;
        MixServerEnabled = true;
        SnsTransferEnabled = true;
        Users = new ArrayList<UserConfigEntity>();

    }

    /**
     * @return the Theme
     */
    public String getTheme() {
        return Theme;
    }

    /**
     * @param Theme the Theme to set
     */
    public void setTheme(String Theme) {
        this.Theme = Theme;
    }

    /**
     * @return the HomeEnabled
     */
    public boolean isHomeEnabled() {
        return HomeEnabled;
    }

    /**
     * @param HomeEnabled the HomeEnabled to set
     */
    public void setHomeEnabled(boolean HomeEnabled) {
        this.HomeEnabled = HomeEnabled;
    }

    /**
     * @return the LoginEnabled
     */
    public boolean isLoginEnabled() {
        return LoginEnabled;
    }

    /**
     * @param LoginEnabled the LoginEnabled to set
     */
    public void setLoginEnabled(boolean LoginEnabled) {
        this.LoginEnabled = LoginEnabled;
    }

    /**
     * @return the PayEnabled
     */
    public boolean isPayEnabled() {
        return PayEnabled;
    }

    /**
     * @param PayEnabled the PayEnabled to set
     */
    public void setPayEnabled(boolean PayEnabled) {
        this.PayEnabled = PayEnabled;
    }

    /**
     * @return the PayRequestEnabled
     */
    public boolean isPayRequestEnabled() {
        return PayRequestEnabled;
    }

    /**
     * @param PayRequestEnabled the PayRequestEnabled to set
     */
    public void setPayRequestEnabled(boolean PayRequestEnabled) {
        this.PayRequestEnabled = PayRequestEnabled;
    }

    /**
     * @return the MixServerEnabled
     */
    public boolean isMixServerEnabled() {
        return MixServerEnabled;
    }

    /**
     * @param MixServerEnabled the MixServerEnabled to set
     */
    public void setMixServerEnabled(boolean MixServerEnabled) {
        this.MixServerEnabled = MixServerEnabled;
    }

    /**
     * @return the SnsTransferEnabled
     */
    public boolean isSnsTransferEnabled() {
        return SnsTransferEnabled;
    }

    /**
     * @param SnsTransferEnabled the SnsTransferEnabled to set
     */
    public void setSnsTransferEnabled(boolean SnsTransferEnabled) {
        this.SnsTransferEnabled = SnsTransferEnabled;
    }

    /**
     * @return the Users
     */
    public List<UserConfigEntity> getUsers() {
        return Users;
    }

    /**
     * @param Users the Users to set
     */
    public void setUsers(List<UserConfigEntity> Users) {
        this.Users = Users;
    }
}
